import request from '@/utils/request'

// 列表页查询
export function delForm(query) {
  return request({
    url: `/t-purchase-plan/deleteById/${query}`,
    method: 'get',
  })
}
// 列表页查询
export function listForm(query) {
  return request({
    url: '/t-purchase-plan/list',
    method: 'post',
    data: query
  })
}
// 查看详情
export function getDetailById(query) {
  return request({
    url: `/t-purchase-plan/getById/${query}`,
    method: 'get',
  })
}

// 新增
export function addForm(query) {
  return request({
    url: `/t-purchase-plan/add`,
    method: 'post',
    data:query
  })
}

// 更新
export function updateForm(query) {
  return request({
    url: `/t-purchase-plan/update`,
    method: 'post',
    data:query
  })
}

// 审核通过的物料查询
export function checkedListForm(query) {
  return request({
    url: `${process.env.VUE_APP_BJB_API}/api/srm/selectMaterialPager`,
    method: 'post',
    data: query
  })
}

// srm数据同步
export function srmSysnc(query) {
  return request({
    url: `/t-purchase-plan/synPlan/${query}`,
    method: 'get',
  })
}


